home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-26 | 2.2 KB | 50 lines | [TEXT/MPS ] |
- Author
- ------
- Alex Rosenberg
-
- If your tool choose dialog features EditText fields that have value limits, such
- as a field that must be a number between 1 and 32767, then you should be using
- staged alerts. All the tools in the Basic Connectivity Set demonstrate this.
-
- That section of the Dialog Manager chapter in Inside Mac that you didn’t
- understand was trying to explain this. As the user enters invalid characters (such
- as a letter) into this EditText field, you call Note, Stop, or CautionAlert.
- Normally, this would display an alert telling the user that this field can only
- accept numbers. But if your ALRT resource is set up correctly, it will just beep
- the first one, two, or three times the user makes this same mistake. Then, every
- subsequent error results in the alert being displayed.
-
- resource 'ALRT' (1000, purgeable) {
- {58, 68, 162, 422},
- 31057,
- { /* array: 4 elements in reverse order 4, 3, 2, 1 */
- OK, visible, sound1,
- OK, visible, sound1,
- OK, invisible, sound1,
- OK, invisible, sound1
- }
- };
-
- This ALRT is like the one in the XMODEM Tool. The first two stages, it just beeps.
- The third consecutive time that Note, Stop, or CautionAlert is called with this
- resource ID, the dialog is actually displayed.
-
- You can find out more about staged alerts in Inside Macintosh Volume 1, page I-409.
- ======================================================================
-
-
-
- -------------------------------------------------------------------------------------
- DISCLAIMER - This paper contains hints to assist CommToolbox software developers with
- their efforts at producing awesome products. They are just hints (a form of help)
- however, and are not intended to represent the only possible solution.
-
- It should also be noted that this paper describes current CommToolbox interface
- usage and while the CTB interface could change, upwards-compatibility will remain a
- focus of the CTB production team wherever possible. Therefore the hints contained
- in this document that use the changing CTB interface represent a solution that should
- remain viable.
- -------------------------------------
- Copyright © 1992 Apple Computer, Inc.
- All rights reserved.
-